import { Injectable } from '@angular/core';
import {RequestUtil} from "../../../util/request-util";
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../models/msg-result";
import {API} from "../../../constants/constants";

@Injectable()
export class ExceptionService {

  constructor(
    private requestUtil :RequestUtil
  ) { }


  exceptionLogDetails(id:string):Observable<MsgResult>{
    return this.requestUtil.get(API.getExceptionLogById+"/"+id+"?format=json")
  }

  exceptionLogDelete(exceptionIdArr):Observable<MsgResult>{
    let params = 'exceptionIdArr='+exceptionIdArr;
    console.log(JSON.stringify(params));
    return this.requestUtil.post(API.deleteExceptionLogs,params);
  }
}
